package net.seabookchen.pojo;

import java.util.Date;

import javax.persistence.Id;
import javax.xml.bind.annotation.XmlRootElement;


@XmlRootElement(name="mood")
public class Mood {
	private @Id Long id;
	private String moods;
	private MoodType type;
	private Date created;
	
	public Mood() {
	
	}
	
	public Mood(String moods) {
		this.moods = moods;
		this.type = MoodType.HAPPY;
		this.created = new Date();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMoods() {
		return moods;
	}

	public void setMoods(String moods) {
		this.moods = moods;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public MoodType getType() {
		return type;
	}

	@Override
	public String toString() {
		return "Mood [id=" + id + ", moods=" + moods + ", type=" + type
				+ ", created=" + created + "]";
	}
	
	public static MoodType getMoodType(String moodType) {
		return MoodType.getMoodType(moodType);
	}

	public void setType(MoodType moodType) {
		this.type = moodType;
	}
	
}
